#include <cstdlib>
#include <iostream>
#include <errno.h>
#include "Connector.h"
#include "MessageListener.h"

class MyMsgListener : public MessageListener{
public:
	virtual int messageListener(Message * msg){
		std::cout<<"MessageListener\n";
		std::cout<<"type="<<msg->type<<std::endl;
		MsgReply(msg->reserved, EOK, NULL, 0);
		std::cout<<"reply send\n";
		return 1;
	}
};

int main(int argc, char *argv[]) {
	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
	MyMsgListener * msgl = new MyMsgListener();
	Connector * conn = Connector::GetInstance();
	conn->setMessageListener(msgl);
	conn->runClient("CLIENT_1");
	return EXIT_SUCCESS;
}

